package loveqq.niceexcel;

import loveqq.niceexcel.read.builder.ExcelReaderBuilder;
import loveqq.niceexcel.read.builder.ExcelSheetReaderBuilder;
import loveqq.niceexcel.read.builder.ReadSheetBuilder;

/**
 * excel读取/写出 工厂
 *
 * @author zhongjh@tsintergy.com
 * @date 2022-08-17
 */
public class NiceExcel {

    public static ExcelReaderBuilder read() {
        return new ExcelReaderBuilder();
    }

    public static <T> ExcelSheetReaderBuilder<T> read(Class<T> headClass) {
        return new ExcelSheetReaderBuilder<>(headClass);
    }

    public static <T> ReadSheetBuilder<T> readSheet(Class<T> headClass) {
        return new ReadSheetBuilder<>(headClass).sheetIndex(0);
    }

}
